package edu.uta.cfl.GUI;

import javax.swing.JTable;

public class ValidateTableResult {
	
	public boolean isNotEmpty(JTable table)
	{
		if(table.getCellEditor()!=null){
			table.getCellEditor().stopCellEditing();
		}
		
		System.out.println(table.getColumnCount());
	
		for(int i=0;i< table.getRowCount();i++)
		{
			for (int j=0;j<table.getColumnCount();j++)
			{
				System.out.println(table.getValueAt(i,j));
				if(table.getValueAt(i, j)==null)
				{
					return false;
				}
				/*String cellData=table.getValueAt(i,j).toString();
				
				if(cellData.trim().length()==0)
				{
					return false;
				}*/
			}
		} 
		return true;
		
	}
}
